<?php

namespace App\Modules\Apicrzs\Http\Controllers\System;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\System\FeedbackService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class FeedbackController extends BaseApicrzsController
{
    public function __construct(FeedbackService $authService)
    {
        $this->service = $authService;
    }
    public function create(Request $request): JsonResponse
    {
        $params = $request->all();
        if ($result = $this->service->create($params)) {
            return $this->sendApiSuccess($result, $this->service->getError());
        }else{
            return $this->sendApiError($this->service->getError());
        }
    }

}
